home *** CD-ROM | disk | FTP | other *** search
/ comtecelectrical.ca / www.comtecelectrical.ca.tar / www.comtecelectrical.ca / infobots / Backup / MSOCache / All Users / 90000409-6000-11D3-8CFE-0150048383C9 / YA561403.CAB / RPLBRF35.CHM_1033 / html / showme_code.vbs < prev   
Text File  |  1998-12-02  |  5KB  |  115 lines

  1. Dim L_ShowMe_ErrorMessage(10)
  2. Dim msouierrSuccess
  3. Dim msouierrFail
  4. Dim msouierrNotValidId
  5. Dim msouierrNoDialog
  6. Dim msouierrWrongDialog
  7. Dim msouierrAdminDisabled
  8. Dim msouierrDisabled
  9. Dim msouierrOn
  10. Dim msouierrOff
  11. Dim msouierrUnknown
  12. Dim msouierrAppModal
  13. Dim sSecurityMSG
  14.  
  15. 'LOCALIZABLE: There needs to be a "Dim" statement for each "L_Security??_ErrorMessage" constant:
  16.     Dim L_SecurityT1_ErrorMessage
  17.     Dim L_SecurityT2_ErrorMessage
  18.     Dim L_SecurityE1_ErrorMessage
  19.     Dim L_SecurityE2_ErrorMessage
  20.     Dim L_SecurityE3_ErrorMessage
  21.     Dim L_SecurityE4_ErrorMessage
  22.     Dim L_App_DialogTitle
  23.  
  24.  
  25. '------------------------
  26. ' Detect if IE is >=4.0 -
  27. '------------------------
  28. Function DetectBrowserVersion()
  29.    Dim iVersion
  30.    iVersion=navigator.appversion
  31.    If Left(iVersion,1)>=4 Then
  32.        DetectBrowserVersion="4.0>"
  33.    Else
  34.        DetectBrowserVersion="3.0x"
  35.    End if
  36. End Function
  37.  
  38. '----------------------------------------
  39. ' Display the appropriate error message -
  40. '----------------------------------------
  41.  
  42. Sub DisplayError(retVal)
  43.     Call InitConstants
  44.     Msgbox L_ShowMe_ErrorMessage(retVal), 4144, L_APP_DialogTitle
  45. End Sub
  46.  
  47. Sub InitConstants()
  48.     'NON-LOCALIZABLE: Return values from OUACtrl.ocx. Used by the "Show Me" jumps.
  49.    msouierrSuccess=0
  50.    msouierrFail=1
  51.    msouierrNotValidId=2
  52.    msouierrNoDialog=3
  53.    msouierrWrongDialog=4
  54.    msouierrAdminDisabled=5
  55.    msouierrDisabled=6
  56.    msouierrOn=7
  57.    msouierrOff=8
  58.    msouierrUnknown=9
  59.    msouierrAppModal=10
  60.  
  61.    'LOCALIZABLE: Possible error messages displayed to the user, in order of frequency
  62.    L_ShowMe_ErrorMessage(msouierrFail)="This task cannot be automatically completed. Please complete the steps manually."        'Message to display when there is a general Show Me failure
  63.    L_ShowMe_ErrorMessage(msouierrAppModal)="A dialog box is already displayed."                                                                'Message to display when the application is already displaying a dialog
  64.    L_ShowMe_ErrorMessage(msouierrDisabled)="This task cannot be automatically completed. Please complete the steps manually."    'Message to display when the application is in a state that makes the feature disabled
  65.    L_ShowMe_ErrorMessage(msouierrNoDialog)="The dialog box was not displayed."                                                                'Message to display when the application doesn't display the requested dialog
  66.    L_ShowMe_ErrorMessage(msouierrAdminDisabled)="The command you are trying to use has been disabled by your administrator."    'Message to display when the feature we're trying to use is disabled by an administrator
  67.    L_ShowMe_ErrorMessage(msouierrWrongDialog)="The option does not exist in the specified dialog box."                                'Message to display when we attempt to "click" a non-existent control on a dialog ("Do It" jumps -- not really used)
  68.    L_ShowMe_ErrorMessage(msouierrNotValidId)="Internal error. Please complete the steps manually."                                        'Message to display when our Show Me code calls the wrong TCID (This should never display!)
  69.    
  70.  
  71.    '***********************************************************************************
  72.    'NOTE TO VENDORS: These string resources need to be the same as the ones in
  73.    '              "IE 3.0x Fixes.xls"!!  Please do the following:
  74.    '                 - Click the "Copy MsgBox" on the worksheet.
  75.    '                 - Remove the existing lines below between "BEGIN" and "END"
  76.    '                 - Paste the contents of the clipboard between "BEGIN" and "END"
  77.    '                 - Insert a "Dim" statement at the top of this file for each
  78.     '                   constant
  79.     '
  80.    '*** BEGIN *** BEGIN *** BEGIN *** BEGIN *** BEGIN *** BEGIN *** BEGIN *** BEGIN ***
  81.  
  82.         'LOCALIZABLE: Problem/Solution style dialog for "Security setting too high"
  83.         L_SecurityT1_ErrorMessage="Help can't show you this procedure because the security setting in your browser is set too high"    'Line 1 of problem text
  84.         L_SecurityT2_ErrorMessage="or the ActiveX control Ouactrl.ocx didn't install correctly."                                                    'Line 2 of problem text
  85.         L_SecurityE1_ErrorMessage="- Select a lower security setting in your browser"                                                                    'Line 1 of solution text
  86.         L_SecurityE2_ErrorMessage="- If you receive this message after selecting a lower security setting, please see your system"        'Line 2 of solution text
  87.         L_SecurityE3_ErrorMessage="  administrator for help troubleshooting the installation of the ActiveX control Ouactrl.ocx"        'Line 3 of solution text
  88.         L_SecurityE4_ErrorMessage="  located in the folder you installed Microsoft Office to."                                                        'Line 4 of solution text
  89.  
  90.         'LOCALIZABLE: 
  91.         sSecurityMSG=L_SecurityT1_ErrorMessage & Chr(13) & L_SecurityT2_ErrorMessage & Chr(13) & Chr(13) & L_SecurityE1_ErrorMessage & Chr(13) & L_SecurityE2_ErrorMessage & Chr(13) & L_SecurityE3_ErrorMessage & Chr(13) & L_SecurityE4_ErrorMessage
  92.  
  93.         'LOCALIZABLE: Title for error dialogs
  94.         L_App_DialogTitle="Microsoft Office Help"        'Title for error dialogs
  95.     
  96.    '*** END *** END *** END *** END *** END *** END *** END *** END *** END *** END ***
  97.     
  98. End Sub
  99.  
  100. Sub InitErrorMsgs()
  101.     'Leave this here just in case we forgot to remove a call.
  102. End Sub
  103.  
  104. '---------------------------------------------
  105. ' Mouse over, mouse out, rollover procedures -
  106. '---------------------------------------------
  107. Sub ColorSteps(sColor)
  108.     If sColor="LightBlue" Then
  109.         steps.className = "Highlight"
  110.     Else
  111.         steps.className = "Normal"
  112.     End If
  113. End Sub
  114.  
  115.